package com.safe.first.common.ddd;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.io.Serializable;
import java.time.Instant;

@Data
public abstract class AbstractEntity implements Serializable, AggregateRoot {

    protected Long id;
    @TableField(fill = FieldFill.INSERT)
    protected Instant createdAt;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    protected Instant updatedAt;
    @TableField(fill = FieldFill.INSERT)
    protected String createdBy;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    protected String updatedBy;
}
